<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Kisebo: Código-Fonte de src/kisebo/Controlador.h</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Gerado por Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
<h1>src/kisebo/Controlador.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CONTROLADOR_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CONTROLADOR_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include "Usuario.h"</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include "Livro.h"</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include "BDLivro.h"</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="keyword">using namespace </span>std;
<a name="l00018"></a><a class="code" href="classControlador.html">00018</a> <span class="keyword">class </span><a class="code" href="classControlador.html" title="Controlador Principal do sistema.">Controlador</a>
<a name="l00019"></a>00019 {
<a name="l00020"></a>00020 <span class="keyword">private</span>:
<a name="l00024"></a>00024         <span class="keywordtype">string</span> DirDados;
<a name="l00025"></a>00025 
<a name="l00029"></a>00029         <a class="code" href="classUsuario.html" title="Entidade Usuario.">Usuario</a> UsuarioCorrente;
<a name="l00030"></a>00030 
<a name="l00035"></a>00035         <a class="code" href="classBDLivro.html" title="Classe para gerenciamento de Livros.">BDLivro</a> Livros;
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="keyword">public</span>:
<a name="l00038"></a>00038 
<a name="l00039"></a>00039         <a class="code" href="classControlador.html#17db08229680461d4d1a2110a92ccf78" title="Construtor.">Controlador</a>();
<a name="l00040"></a>00040         <span class="keyword">virtual</span> <a class="code" href="classControlador.html#2f1828135645f009d3772de86f12d507" title="Destrutor.">~Controlador</a>();
<a name="l00041"></a>00041         <span class="keywordtype">void</span> <a class="code" href="classControlador.html#218bfe1531a720ae363491c959b69ede" title="Método não implementado.">init</a>();
<a name="l00042"></a>00042         <span class="comment">// Caso de Uso 1</span>
<a name="l00043"></a>00043         <span class="keywordtype">void</span> <a class="code" href="classControlador.html#271416ac8c1f8bfd0ce87d6189369722" title="Lê arquivo de logins.">CarregaLogins</a>();
<a name="l00044"></a>00044         <a class="code" href="classUsuario.html" title="Entidade Usuario.">Usuario</a> <a class="code" href="classControlador.html#3cf3278000d0d8fe89de0d241804eaf2" title="Verifica se o login e a senha estao corretos.">CheckLogin</a>(<span class="keywordtype">string</span> login, <span class="keywordtype">string</span> senha);
<a name="l00045"></a>00045 
<a name="l00046"></a>00046         <span class="comment">// Caso de Uso 2</span>
<a name="l00047"></a>00047         <span class="keywordtype">long</span> <a class="code" href="classControlador.html#2c2395ceeb70cc3d367722405488a4d2" title="Retorna o valor do próximo ID disponível para um novo Livro.">GetProximoLivroID</a>();
<a name="l00048"></a>00048         <span class="keywordtype">void</span> <a class="code" href="classControlador.html#ffb44223f18b155460b24d7bd4bfb776" title="Adiciona um novo Livro.">AdicionaLivro</a>(<a class="code" href="classLivro.html" title="Entidade Livro.">Livro</a> novo_livro);
<a name="l00049"></a>00049         <span class="comment">// Caso de Uso 3</span>
<a name="l00050"></a>00050         <a class="code" href="classLivro.html" title="Entidade Livro.">Livro</a> <a class="code" href="classControlador.html#b008ee0b408ff40891661675538a3c04" title="Seleciona um livro a partir do ID.">SelecionaLivro</a>(<span class="keywordtype">long</span> <span class="keywordtype">id</span>);
<a name="l00051"></a>00051         <span class="comment">// Caso de Uso 4</span>
<a name="l00052"></a>00052 
<a name="l00053"></a>00053         <span class="comment">// Caso de Uso 5, 6 e 7</span>
<a name="l00054"></a>00054         <a class="code" href="classUsuario.html" title="Entidade Usuario.">Usuario</a> *<a class="code" href="classControlador.html#b088c6f36605ff0557da679e66ed930b" title="Retorna usuario corrente.">GetUsuario</a>();
<a name="l00055"></a>00055         <span class="keywordtype">void</span> <a class="code" href="classControlador.html#39bb53a729e67478566ede39cf6cb61f" title="Monta arvore de pesquisa.">MontaPesquisa</a>(<span class="keywordtype">int</span> tipo_interesse);
<a name="l00056"></a>00056         vector&lt;Livro&gt; <a class="code" href="classControlador.html#5589c50ccc26d229961aef9c0f6178c4" title="Realiza a pesquisa.">PesquisaInteresses</a>(<span class="keywordtype">string</span> valor);
<a name="l00057"></a>00057 };
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="preprocessor">#endif </span><span class="comment">/*CONTROLADOR_H_*/</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Gerado em Wed Dec 3 16:28:03 2008 para Kisebo por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
